package com.edee.bigday.auth.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

@Data
public class UserRegisterVo {
//    @NotNull(message = "请填写用户名") //此处不可用
//    @NotEmpty(message = "请填写用户名NotEmpty")
    @Length(min = 6, max = 18, message = "用户名长度应在6~18位之间")
    private String userName;

//    @NotNull(message = "请输入密码") //此处不可用
//    @NotEmpty(message = "请输入密码NotEmpty")
    @Length(min = 6, max = 18, message = "密码长度应在6~18位之间")
    private String password;

//    @NotNull(message = "请填写手机号码") //此处不可用
//    @NotEmpty(message = "请填写手机号码NotEmpty")
    @Pattern(regexp = "^[1]([3-9])[0-9]{9}$",message = "手机号码格式异常，请检查。")
    private String mobile;

//    @NotNull(message = "请输入验证码") //此处不可用
    @NotEmpty(message = "请输入验证码NotEmpty")
//    @Length(min = 4, max = 8, message = "验证码长度应在4~8位之间")
    private String code;
}
